In recent years, advances in technology have led to more powerful computing devices. For example, a server used in business transaction processing or e-commerce may require simultaneous execution of a high volume of transactions. Accordingly, server systems are typically set to process the highest expectant volume of transactions or workload. Nevertheless, servers run, during much of the time, at a fraction of the peak capacity. Regardless of the workload, however, these systems generally run at nearly full power, thereby consuming great amounts of electrical power. Particularly, as millions surf the World Wide Web and organizations (including corporations and government) use the Internet to implement more of their business, internet servers form the core of e-business and tend to be massive consumers of power.
In addition, a system running at nearly full power dissipates large amounts of heat, requiring cooling fans which create a high decibel noise. The cooling and power distribution requirements also limit the number of server systems that can be stacked in “racks”. As a result, internet data centers are faced with increasing infrastructure requirements for space, cooling, and electrical power. Furthermore, for computing devices with a finite source of power such as portable computers, power consumption can limit the usage time as well as generate uncomfortable heat for users. Therefore, power management can be critical for any computing devices.
Currently, some Operating Systems (OS) have built-in power management. For example, Advanced Configuration and Power Interface (ACPI) compliant hardware can support dynamic power management under the control of an OS, for example MICROSOFT WINDOWS® 2000. Based on the Central Processing Unit (CPU) usage, the MICROSOFT WINDOWS® 2000 dynamically controls the power consumed. Under MICROSOFT WINDOWS® 2000, the OS defines “CPU usage” as “time not spent in the OS idle loop”. On ACPI systems, the OS transitions the CPU into a low power state when idle. This reduces the CPU power consumption.
Nevertheless, in a Java application server environment, the ability of an OS to efficiently manage CPU power is limited. Particularly, as seen at the level of an OS, the Java application server software and the Java Virtual Machine (JVM) can appear to consume a large percentage of the CPU time, even under relatively light user load. As the OS has limited visibility into the actual CPU usage of the server system, the OS cannot efficiently manage power on its own with the existing mechanisms. For example, threads could be in a spin loop or doing housekeeping tasks, which does not require full CPU power usage. Moreover, when the JVM makes use of a user-level threads library, the OS's visibility into the actual CPU usage is reduced further since the OS sees only a few active threads, while a large number of user threads are mapped on top of the OS native threads.